package com.pig.goods.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.pig.goods.dao.CategoryDao;
import com.pig.goods.service.CategoryService;
import com.pig.pojo.commgoods.Category;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CategoryServiceImpl implements CategoryService {
    @Autowired
    private CategoryDao categoryDao;

    @Override
    public List<Category> findAllCategory() {
        QueryWrapper<Category> query = new QueryWrapper<>();
        List<Category> categories = categoryDao.selectList(query);
        return categories;
    }
}
